import { type RouteRecordRaw } from "vue-router";

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    component: () => import('@/pages/home/index.vue'),
    redirect: '/home',
    children: [
      {
        path: 'home',
        name: 'Home',
        component: () => import('@/pages/home/index.vue'),
      }
    ]
  },
  {
    path: '/album/:id',
    name: 'Album',
    component: () => import('@/pages/album/index.vue')
  },
  {
    path: `/listeningList/:title?`,
    name: 'ListeningList',
    component: () => import(`@/pages/listeningList/index.vue`),

  },
  {
    path: '/category',
    name: 'Category',
    component: () => import('@/pages/category/index.vue')
  },
  {
    path: '/category/:id/:title',
    name: 'CategoryId',
    component: () => import('@/pages/twoCategory/index.vue')
  },
  //登录
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/pages/login/index.vue'),
    meta: {
      hidden: true
    }
  },
  {
    path: '/category',
    name: 'Category',
    component: () => import('@/pages/category/index.vue')
  },
  {
    path: '/category/:id/:title',
    name: 'CategoryId',
    component: () => import('@/pages/twoCategory/index.vue')
  },
  //登录
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/pages/login/index.vue'),
    meta: {
      hidden: true
    },
    // children: [
    //     {
    //         name: 'remen',
    //         path: "/listeningList/:title?",
    //         component: () => import(`@/components/list-container/index.vue`),
    //     }
    // ]
  },
  //排行榜
  {
    path: '/rank',
    name: 'Rank',
    component: () => import('@/pages/Rank/index.vue'),
  },
  // children: [
  //     {
  //         name: 'remen',
  //         path: "/listeningList/:title?",
  //         component: () => import(`@/components/list-container/index.vue`),
  //     }
  // ]
  //排行榜
  {
    path: '/rank',
    component: () => import('@/pages/Rank/index.vue'),
  },
  {
    path: "/search",
    name: "Search",
    component: () => import("@/pages/search/index.vue"),
  },
  {
    path: "/two",
    name: "two",
    component: () => import("@/pages/search/top/index.vue"),
    children: [
      {
        path: "qb",
        name: "qb",
        component: () => import("@/pages/search/search-two-qb/index.vue"),
      },
      {
        path: "zj",
        name: "zj",
        component: () => import("@/pages/search/search-two-zj/index.vue"),
      },
      {
        path: "sy",
        name: "sy",
        component: () => import("@/pages/search/search-two-sy/index.vue"),
      },
      {
        path: "zb",
        name: "zb",
        component: () => import("@/pages/search/search-two-zb/index.vue"),
      },
    ],
  },
];

export default routes;
